# 作者: 肖老师
# 2024年11月14日11时33分23秒
# xxxrlmk@163.com
class Dog(object):

    def __init__(self, name):
        self.name = name

    def game(self):
        print("%s 蹦蹦跳跳的玩耍..." % self.name)


class XiaoTianDog(Dog):

    def game(self):
        print("%s 飞到天上去玩耍..." % self.name)


class Person:
    def __init__(self, name):
        self.name = name

    def game_with_dog(self, dog: Dog):
        print("%s 和 %s 快乐的玩耍..." % (self.name, dog.name))
        dog.game()


# wangcai=Dog('旺财')
wangcai = XiaoTianDog('哮天犬')
wangcai.game()

xiao_ming = Person('小明')
xiao_ming.game_with_dog(wangcai)
